package com.xiaoxx.coin.po.res;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(description = "响应的订单信息")
public class CommonOrderResponse {
    @ApiModelProperty(value = "用户自定义的订单号", required = true)
    private String clientOrderId;

    @ApiModelProperty(value = "已成交数量", example = "0")
    private String cumQty;

    @ApiModelProperty(value = "成交金额", example = "0")
    private String cumQuote;

    @ApiModelProperty(value = "成交量", example = "0")
    private String executedQty;

    @ApiModelProperty(value = "系统订单号", example = "22542179", required = true)
    private Long orderId;

    @ApiModelProperty(value = "平均成交价", example = "0.00000")
    private String avgPrice;

    @ApiModelProperty(value = "原始委托数量", example = "10", required = true)
    private String origQty;

    @ApiModelProperty(value = "委托价格", example = "0")
    private String price;

    @ApiModelProperty(value = "仅减仓标志", example = "false")
    private boolean reduceOnly;

    @ApiModelProperty(value = "买卖方向", example = "SELL", allowableValues = "BUY, SELL")
    private String side;

    @ApiModelProperty(value = "持仓方向", example = "SHORT", allowableValues = "BOTH, LONG, SHORT")
    private String positionSide;

    @ApiModelProperty(value = "订单状态", example = "NEW", allowableValues = "NEW, PARTIALLY_FILLED, FILLED, CANCELED, REJECTED, EXPIRED")
    private String status;

    @ApiModelProperty(value = "触发价", example = "0", notes = "对于`TRAILING_STOP_MARKET`无效")
    private String stopPrice;

    @ApiModelProperty(value = "是否条件全平仓", example = "false")
    private boolean closePosition;

    @ApiModelProperty(value = "交易对", example = "BTCUSDT", required = true)
    private String symbol;

    @ApiModelProperty(value = "有效方法", example = "GTD", allowableValues = "GTC, FOK, IOC, GTD")
    private String timeInForce;

    @ApiModelProperty(value = "订单类型", example = "TRAILING_STOP_MARKET", allowableValues = "LIMIT, MARKET, STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET")
    private String type;

    @ApiModelProperty(value = "触发前订单类型", example = "TRAILING_STOP_MARKET")
    private String origType;

    @ApiModelProperty(value = "跟踪止损激活价格", example = "9020", notes = "仅`TRAILING_STOP_MARKET`订单返回此字段")
    private String activatePrice;

    @ApiModelProperty(value = "跟踪止损回调比例", example = "0.3", notes = "仅`TRAILING_STOP_MARKET`订单返回此字段")
    private String priceRate;

    @ApiModelProperty(value = "更新时间", example = "1566818724722")
    private Long updateTime;

    @ApiModelProperty(value = "条件价格触发类型", example = "CONTRACT_PRICE", allowableValues = "CONTRACT_PRICE, MARK_PRICE")
    private String workingType;

    @ApiModelProperty(value = "是否开启条件单触发保护", example = "false")
    private boolean priceProtect;

    @ApiModelProperty(value = "盘口价格下单模式", example = "NONE", allowableValues = "NONE, LAST")
    private String priceMatch;

    @ApiModelProperty(value = "订单自成交保护模式", example = "NONE", allowableValues = "NONE, AUTO")
    private String selfTradePreventionMode;

    @ApiModelProperty(value = "订单TIF为GTD时的自动取消时间", example = "1693207680000")
    private Long goodTillDate;
}
